package com.haiyan.demo06_方法的重写;

class Fu{
    public void method()
    {
        System.out.println("Fu method方法");
    }
    public void sport()
    {
        System.out.println("运动的方法为游泳");
    }
    public void run()
    {
        System.out.println("第一圈");
        System.out.println("第二圈");
        System.out.println("第三圈");
        System.out.println("第四圈");
    }
}
class Zi extends Fu{
    @Override
    public void method() {
        System.out.println("Zi method方法");
    }

    @Override
    public void sport() {
        System.out.println("运动的方式为跑步");
    }

    @Override
    public void run() {
        super.run();
        System.out.println("第五圈");
        System.out.println("第六圈");
        System.out.println("第七圈");
    }
}
public class Test {
    public static void main(String[] args) {
        Zi zi=new Zi();
        zi.sport();
        zi.run();
    }
}
